package com.appkubes.mall.core.pojo;

import com.appkubes.mall.core.po.MallAdminBinding;
import com.appkubes.mall.core.po.MallAdminBindingExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface MallAdminBindingMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_admin_binding
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallAdminBindingSqlProvider.class, method="countByExample")
    long countByExample(MallAdminBindingExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_admin_binding
     *
     * @mbg.generated
     */
    @DeleteProvider(type=MallAdminBindingSqlProvider.class, method="deleteByExample")
    int deleteByExample(MallAdminBindingExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_admin_binding
     *
     * @mbg.generated
     */
    @Delete({
        "delete from mall_admin_binding",
        "where admin_key = #{adminKey,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String adminKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_admin_binding
     *
     * @mbg.generated
     */
    @Insert({
        "insert into mall_admin_binding (admin_key, app_key, ",
        "supplier_key, customer_key, ",
        "promoter_key, taobao_pid, ",
        "create_time, update_time, ",
        "version)",
        "values (#{adminKey,jdbcType=VARCHAR}, #{appKey,jdbcType=VARCHAR}, ",
        "#{supplierKey,jdbcType=VARCHAR}, #{customerKey,jdbcType=VARCHAR}, ",
        "#{promoterKey,jdbcType=VARCHAR}, #{taobaoPid,jdbcType=VARCHAR}, ",
        "#{createTime,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER}, ",
        "#{version,jdbcType=INTEGER})"
    })
    int insert(MallAdminBinding record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_admin_binding
     *
     * @mbg.generated
     */
    @InsertProvider(type=MallAdminBindingSqlProvider.class, method="insertSelective")
    int insertSelective(MallAdminBinding record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_admin_binding
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallAdminBindingSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="admin_key", property="adminKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="supplier_key", property="supplierKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="customer_key", property="customerKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="promoter_key", property="promoterKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="taobao_pid", property="taobaoPid", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallAdminBinding> selectByExampleWithRowbounds(MallAdminBindingExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_admin_binding
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallAdminBindingSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="admin_key", property="adminKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="supplier_key", property="supplierKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="customer_key", property="customerKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="promoter_key", property="promoterKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="taobao_pid", property="taobaoPid", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallAdminBinding> selectByExample(MallAdminBindingExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_admin_binding
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "admin_key, app_key, supplier_key, customer_key, promoter_key, taobao_pid, create_time, ",
        "update_time, version",
        "from mall_admin_binding",
        "where admin_key = #{adminKey,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="admin_key", property="adminKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="supplier_key", property="supplierKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="customer_key", property="customerKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="promoter_key", property="promoterKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="taobao_pid", property="taobaoPid", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    MallAdminBinding selectByPrimaryKey(String adminKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_admin_binding
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallAdminBindingSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") MallAdminBinding record, @Param("example") MallAdminBindingExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_admin_binding
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallAdminBindingSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") MallAdminBinding record, @Param("example") MallAdminBindingExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_admin_binding
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallAdminBindingSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(MallAdminBinding record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_admin_binding
     *
     * @mbg.generated
     */
    @Update({
        "update mall_admin_binding",
        "set app_key = #{appKey,jdbcType=VARCHAR},",
          "supplier_key = #{supplierKey,jdbcType=VARCHAR},",
          "customer_key = #{customerKey,jdbcType=VARCHAR},",
          "promoter_key = #{promoterKey,jdbcType=VARCHAR},",
          "taobao_pid = #{taobaoPid,jdbcType=VARCHAR},",
          "create_time = #{createTime,jdbcType=INTEGER},",
          "update_time = #{updateTime,jdbcType=INTEGER},",
          "version = #{version,jdbcType=INTEGER}",
        "where admin_key = #{adminKey,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(MallAdminBinding record);
}